using AutoMapper;
using BCVP.Net8.Common;
using BCVP.Net8.Model;
using BCVP.Net8.Service;
using Microsoft.AspNetCore.Mvc;

namespace BCVP.Net8.Controllers
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class TestController : ControllerBase
    {        

        private readonly ILogger<TestController> _logger;
        private readonly IMapper _mapper;

        public TestController(ILogger<TestController> logger,IMapper mapper)
        {
            _logger = logger;
            _mapper = mapper;
        }

        //[HttpGet]
        //public async Task<List<UserVo>> GetUsers()
        //{
        //    var userService = new UserService();
        //    var users = await userService.Query();
        //    return users;
        //}

        //[HttpGet]
        //public async Task<List<Role>> GetRoles()
        //{
        //    var roleService = new BaseService<Role, RoleVo>(_mapper);
        //    var roles = await roleService.Query();
        //    return roles;
        //}

        //[HttpGet]
        //public async Task<List<RoleVo>> GetRoles2()
        //{
        //    var roleService = new BaseService<Role, RoleVo>(_mapper);
        //    var roles = await roleService.Query2();
        //    return roles;
        //}       
    }
}
